/*
 * KSP_solver.h
 *
 *  Created on: 14/09/2011
 *      Author: rogsoares
 */

#ifndef KSP_SOLVER_H_
#define KSP_SOLVER_H_

#include "includes.h"

/*! \brief: Solves a linear system of equations.
   * \param A the matrix
   * \param pcMatrix could be the same matrix A (for preconditioning)
   * \param y right-hand-side vector
   * \param x solution vector
   * \param ksptype type of solver (GMRES, CG, CG stabilized, ....)
   * \param pctype pre-conditioner type (Jacobi, LU, ILU(n), ASM, ....)
   * \return elapsed time.
   */
double KSP_solver(Mat A, Mat pcMatrix, Vec y, Vec x, KSPType ksptype, PCType pctype);


#endif /* KSP_SOLVER_H_ */
